export const wxReq = (options) => {
  return new Promise((resolve, reject) => {
    const { url, data, method = 'POST' } = options
    wx.request({
      url: `https://keyue-electronic.com${url}`,
      data, method,
      success(res) {
        const {result,data} = res.data
        if(result === 0){
          resolve(res.data.data)
        }else{
          reject(res.data)
        }
      },
      complete(e) {
      }
    })
  })
}